<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>警种协作办理</title>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/openwindow.js"></script>
<script type="text/javascript" src="js/file.js"></script>
<script type="text/javascript" src="js/report.js"></script>
<script type="text/javascript">
 function loadFile(val){
		var fileId=$("#fileArray").val();
		if(fileId!=''&&fileId!='null'){
			var param={"fileArray":fileId};
			$.post("getFileList.action",param,function(data) {
				var list=data.fileList;
				for(var i=0;i<list.length;i++){
					$("#"+val).prepend("<tr><td><input type=\"checkbox\" name=\"checkbox2\" id=\""+list[i].id+"\" value=\""+list[i].id+"\" />&nbsp;<a href=\"downLoadFile.action?fileId="+list[i].id+"\">"+list[i].name+"</a>&nbsp;</tr>");
		        }
			},"json");
		}
	} 
	
</script>
</head>
<body onload="loadFile('filetable')">
<input type="hidden" id="currentPage" value="${currentPage}">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tbody>
  <tr>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
    <td style="background: url('image/wsoa_window_002.gif');"><table border="0" cellpadding="0" cellspacing="0">
      <tbody><tr>
        <td align="center" style="background: url('image/wsoa_window_002.gif');" width="10"><img src="image/center_19.gif"></td>
        <td align="center" style="background: url('image/wsoa_window_002.gif');"></td>
        <td></td>
        </tr>
    </tbody>
    </table></td>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
  </tr>
  <tr>
    <td style="background: url('image/wsoa_window_010.gif');"  width="1">&nbsp;</td>
    <td>
    <form action="" method="post">
  <table width="100%" align="center" class="table5">
		<tr class="reigh_list4">
			<td class="table5 bgcolor5"  align="right" width="8%">
			标题：
			</td>
			<td class="table5" align="left" colspan="2">
				${team.policeTeam.title}
		</tr>
		<tr class="reigh_list4">
			<td class="table5 bgcolor5"   align="right" width="8%">
			内容：
			</td>
			<td class="table5" align="left" colspan="2">
				${team.policeTeam.content}
			</td>
		</tr>
		<tr class="reigh_list4">
        	<td class="table5 bgcolor5" align="right"  align="right" width="8%">
			附件：
			</td>
			<td class="table5" align="left" colspan="2"><a href="javascript:file_upload('filetable')">添加附件</a>&nbsp;&nbsp;<a href="javascript:fileDel('filetable')">删除</a></td>
		</tr>
		<tr>
			<td class="table5 bgcolor5" align="right"></td>
        	<td class="table5" align="left" colspan="2">
				<table id="filetable" style="border:#cddee9 double 2px; width:605px">
					
				</table>
			</td>
         </tr>
	</table>
	<p></p>
	<c:if test="${!empty reportList}">
	<table  align="center" width="95%" border="0" cellspacing="1" cellpadding="0" bordercolor="#999999" bgcolor="#999999" >
		<tr>
			<td   class="bgcolor5" align="center" height="17px" >办理情况</td>
		</tr>
		<c:forEach items="${reportList}" var="report" varStatus="index">
		<tr>
			<td  style="background-color: #ffffff;word-break:break-all;" align="left"><div align="left">${index.count}#&nbsp;${report.userName}&nbsp;<fmt:formatDate value="${report.reportTime}" type="both"/><br/><br/></div>${report.content}</td>
		</tr>
		</c:forEach>
	</table>
	</c:if>
	<input type="hidden" name="policeTeam.id" value="${team.policeTeam.id}">
	<input type="hidden" name="team.id" value="${team.id}"> 
	<input type="hidden" id="fileArray" name="policeTeam.fileId" value="${team.policeTeam.fileId}">
	<table width="100%" style="margin-top: 10px">
	<tr>
			<td align="right" width="13%">
			办理意见：
			</td>
			<td colspan="3">
				<textarea id="report" name="content" onkeyup="textLength(this,500)" style="width: 90%;height: 60px"></textarea>
			</td>
		</tr>
	</table>
	<table style="margin-top: 5px" width="100%" align="center">
		<tr>
			<td align="right" width="13%">
			办理人：
			</td>
			<td colspan="2">
				<textarea  cols="10" readonly="readonly" id="snames" name="names" style="height: 30px;width: 400px">${names}</textarea>
			    <input type="hidden" id="sids" name="users" value="${users}"><input type="button" class="sscc" onclick="selectUser('s')">
			</td>
		<td colspan="2"><input name="status" type="checkbox" value="1">短信提醒</td>
		</tr>
			<tr>
			<td colspan="3" align="center">
				<c:if test="${sessionScope.userInfo.id==team.policeTeam.userId}">
				<input class="button_04" type="button" onclick="submitDaftNext()" value="提交下一步" >&nbsp;&nbsp;
				<input class="button_02" type="button" onclick="completeAllPolice('${team.policeTeam.id}','${team.id}')" value="结束" >&nbsp;&nbsp;
				</c:if>
				<c:if test="${sessionScope.userInfo.id!=team.policeTeam.userId}">
				<input class="button_04" type="button" onclick="submitNext()" value="提交下一步" >&nbsp;&nbsp;
				<input class="button_02" type="button" onclick="completePolice('${team.policeTeam.id}','${team.id}')" value="结束" >&nbsp;&nbsp;
				</c:if>
				<input class="button_02" type="button" onclick="window.close()" value="关闭" >
			 </td> 
		 </tr>
	</table>
	</form>
	<table style="border: 1px solid  #ffffff;" align="center" width="95%" border="0" cellspacing="1" cellpadding="0" bgcolor="#999999" >
		<c:forEach items="${historyList}" var="his">
		<tr>
		<td style="background: #ffffff" width="5%">${his.levels}</td>
		<td style="background: #ffffff" width="15%">${his.userName}</td>
		<td style="background: #ffffff" width="15%">${his.status}</td>
		<td style="background: #ffffff" >${his.actorName}</td>
		<td style="background: #ffffff" width="20%"><fmt:formatDate value="${his.createTime}" type="both"/></td>
		</tr>
		</c:forEach>
	</table>
  </td>
<td style="background: url('image/wsoa_window_006.gif');"  width="1">&nbsp;</td></tr>
  <tr>
    <td height="1" width="1"><img src="image/wsoa_window_009.gif" height="16" width="14"></td>
    <td style="background: url('image/wsoa_window_008.gif');" height="1"></td>
    <td height="1" width="1"><img src="image/wsoa_window_007.gif" height="16" width="12"></td>
  </tr>
</tbody>
</table>
</body>
</html>